﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TGB.Core.Infrastructure;
using TGBTech.Core.Models.Services;

namespace TGBTech.WebAdmin.Controllers
{
    public class BangLuuChuyenTienTeController : Controller
    {
        private TGBTechDb db = new TGBTechDb();
        // GET: BangLuuChuyenTienTe
        public ActionResult Index()
        {

            return View();
        }

        //
        // GET: /BangCanDoiKeToan/Create
        public ActionResult Create()
        {
            return View();
        }

        //
        // POST: /BangCanDoiKeToan/Create
        [HttpPost]
        public ActionResult Create(DateTime? StartDate, DateTime? EndDate)
        {
            try
            {
                // TODO: Add insert logic here
                //Goi services
                CanDoiKeToanService service = new CanDoiKeToanService();
                var cdkt = service.createCanDoiKeToan(CanDoiKeToanService.LOAIBAOCAO_CDKT, StartDate.GetValueOrDefault(), EndDate.GetValueOrDefault());
                ViewBag.So = cdkt;
                return View("Create", cdkt.ListModel);
            }
            catch
            {
                return View();
            }
        }

    }
}